#include<stdio.h>
#include<stdlib.h>

#include "01_tree_define.c"

int main(){
	BtNode *p, *p1, *p2;

	p=( BtNode* )malloc( sizeof(BtNode) );
	p->data='A';

	p1=( BtNode* )malloc( sizeof(BtNode) );
	p1->data='B';
	p1->lchild=NULL;
	p1->rchild=NULL;

	p2=( BtNode* )malloc( sizeof(BtNode) );
	p2->data='c';
	p2->lchild=NULL;
	p2->rchild=NULL;

	p->lchild=p1;
	p->rchild=p2;

	prior_order(p); //遍历树的函数定义见下文
	printf("\n");
	
	in_order(p);
	printf("\n");

	post_order(p);
	printf("\n");

	free(p1);
	free(p2);
	free(p);
	return 0;
}

